import Vue from 'vue'
import App from './App'
import store from './store'
import moment from 'moment'; //导入模块
import * as utils from '@/common/util.js'
import * as ResponseStatus from '@/common/response-status.js'

Vue.prototype.$util = utils
Vue.prototype.$ResponseStatus = ResponseStatus
Vue.prototype.$moment = moment;//赋值使用
// Vue.prototype.$environment = "dev"
Vue.prototype.$environment = "prod"
import appPush from '@/plugins/APPPush/index.js'
 Vue.use(appPush)

import zyworkIcon from '@/components/zywork-icon/zywork-icon.vue'
Vue.component('zywork-icon',zyworkIcon)

import customTabBar from '@/components/custom-tab-bar/custom-tab-bar.vue'//注册customTabBar全局组件
Vue.component('custom-tab-bar',customTabBar)

import customListItem from '@/components/custom-list-item/custom-list-item.vue'//注册customListItem全局组件
Vue.component('custom-list-item',customListItem)

Vue.config.productionTip = false

App.mpType = 'app'

const prePage = ()=>{
	let pages = getCurrentPages();
	let prePage = pages[pages.length - 2];
	// #ifdef H5
	return prePage;
	// #endif
	return prePage.$vm;
}
Vue.prototype.$api = {prePage};
Vue.prototype.$store = store;
const app = new Vue({
	store,
    ...App
})
app.$mount()
